package com.ruoyi.counter.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.ruoyi.counter.domain.Counter;
import com.ruoyi.counter.domain.CounterStatisticalList;
import com.ruoyi.counter.domain.Countersub;
import com.ruoyi.counter.mapper.CounterMapper;
import com.ruoyi.counter.mapper.CounterStatisticalListMapper;
import com.ruoyi.counter.service.ICounterStatisticalListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 工器具领取归还汇总Service业务层处理
 *
 * @author 仝帅
 * @date 2021-10-12
 */
@Service
public class CounterStatisticalListServiceImpl implements ICounterStatisticalListService
{
    @Autowired(required = false)
    private CounterStatisticalListMapper counterStatisticalListMapper;
    @Autowired(required = false)
    private CounterMapper counterMapper;
    /**
     * 查询工器具领取归还汇总
     *
     * @param id 工器具领取归还汇总ID
     * @return 工器具领取归还汇总
     */
    @Override
    public CounterStatisticalList selectCounterStatisticalListById(Long id)
    {
      //  return counterStatisticalListMapper.selectCounterStatisticalListById(id);
        return null;
    }




    /**
     * 查询工器具领取归还汇总列表
     *
     * @param counterStatisticalList 工器具领取归还汇总
     * @return 工器具领取归还汇总
     */
    @Override
    public List<CounterStatisticalList> selectCounterStatisticalListList(CounterStatisticalList counterStatisticalList)
    {
        return counterStatisticalListMapper.selectCounterStatisticalListList(counterStatisticalList);
    }

    /**
     * 新增工器具领取归还汇总
     *
     * @param counterStatisticalList 工器具领取归还汇总
     * @return 结果
     */
    @Override
    public int insertCounterStatisticalList(CounterStatisticalList counterStatisticalList)
    {
        return counterStatisticalListMapper.insertCounterStatisticalList(counterStatisticalList);
    }

    /**
     * 修改工器具领取归还汇总
     *
     * @param counterStatisticalList 工器具领取归还汇总
     * @return 结果
     */
    @Override
    public int updateCounterStatisticalList(CounterStatisticalList counterStatisticalList)
    {
        return counterStatisticalListMapper.updateCounterStatisticalList(counterStatisticalList);
    }

    /**
     * 批量删除工器具领取归还汇总
     *
     * @param ids 需要删除的工器具领取归还汇总ID
     * @return 结果
     */
    @Override
    public int deleteCounterStatisticalListByIds(Long[] ids)
    {
        return counterStatisticalListMapper.deleteCounterStatisticalListByIds(ids);
    }

    /**
     * 删除工器具领取归还汇总信息
     *
     * @param id 工器具领取归还汇总ID
     * @return 结果
     */
    @Override
    public int deleteCounterStatisticalListById(Long id)
    {
        return counterStatisticalListMapper.deleteCounterStatisticalListById(id);
    }


    /**
     * 查询整合所需要工器具领取归还汇总
     *
     * @param counterStatisticalList 集合
     * @return 汇总
     */
    public List<CounterStatisticalList> selectCounterStatisticalListChect(CounterStatisticalList counterStatisticalList){
        return counterStatisticalListMapper.selectCounterStatisticalListChect(counterStatisticalList);
    }

    @Override
    public List<Counter> selectCounterListVo(Counter counter) {
        return counterMapper.selectCounterList(counter);
    }

    @Override
    public int insertCounterListVo(Counter counter) {
        return 0;
    }


//    public List<Counter> selectCounterListVo(Counter counter){
//        return counterMapper.selectCounterList(counter);
//    }

    /**
     * 查询工器具柜档案列表
     *
     * @param counter 工器具柜档案
     * @return 工器具柜档案
     */
    public void selectPowerInfo(Counter counter){
        String PowerName=counter.getOrganidName();
        Long counterid = counter.getCounterid();
        List<CounterStatisticalList> list=new ArrayList<>();



    }
}
